package razor.blade;

import javafx.scene.*;
import javafx.beans.property.*;
import javafx.beans.value.*;
import javafx.geometry.*;
import javafx.beans.binding.*;
import javafx.event.*;
import javafx.scene.*;
import javafx.scene.paint.*;
import javafx.stage.*;
import javafx.beans.property.*;
import javafx.beans.value.*;
import javafx.scene.image.*;
import javafx.scene.input.*;
import javafx.scene.shape.*;
import tee.binding.*;
public class Anchor {
    private Numeric x;
    private Numeric y;
    private Group root;
    public Node node() {
        return root;
    }
    public Anchor content(Node n) {
        root.getChildren().clear();
        root.getChildren().add(n);
        return this;
    }
    public Anchor x(double it) {
	x.value(it);
	return this;
    }
    public Anchor x(int it) {
	x.value(it);
	return this;
    }
    public Numeric x() {
	return x;
    }
    public Anchor x(It<Double> it) {
	x.bind(it);
	return this;
    }
    public Anchor y(double it) {
	y.value(it);
	return this;
    }
    public Anchor y(int it) {
	y.value(it);
	return this;
    }
    public Numeric y() {
	return y;
    }
    public Anchor y(It<Double> it) {
	y.bind(it);
	return this;
    }
    public Anchor() {
        x = new Numeric().value(0);
        y = new Numeric().value(0);
        root = new Group();
        root.translateXProperty().bind(new Tee<Double>(x));
        root.translateYProperty().bind(new Tee<Double>(y));
    }
}
